package com.maple.mapper;

import com.maple.entity.AddressBook;
import org.apache.ibatis.annotations.Delete;

import java.util.List;

public interface AddressBookMapper {

    /**
     * 新增地址
     * @param addressBook
     */
    void add(AddressBook addressBook);

    /**
     * 条件查询
     * @param addressBook
     * @return
     */
    List<AddressBook> query(AddressBook addressBook);

    /**
     * 条件更新
     * @param addressBook
     */
    void update(AddressBook addressBook);

    /**
     * 根据id删除地址
     * @param id
     */
    @Delete("delete from address_book where id = #{id}")
    void delete(Long id);
}
